﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;
using JXT.PrimaryKey.Batman.Core.WcfService;
using JXT.PrimaryKey.Batman.WcfService.Models;
using JXT.PrimaryKey.Batman.WcfService.Models.Quotation;

namespace JXT.PrimaryKey.Batman.WcfService.Interfaces
{
    /// <summary>
    /// 行情相关接口
    /// </summary>
    [ServiceContract(Namespace = ServiceEnvironment.ServiceNamespace, Name = "quotation")]
    public interface IQuotation
    {
        [OperationContract]
        [WebGet(UriTemplate = "securities/search/{code}/{*num}", RequestFormat = ServiceEnvironment.WebRequestFormat, ResponseFormat = ServiceEnvironment.WebResponseFormat, BodyStyle = ServiceEnvironment.WebBodyStyle)]
        List<Securities> SearchSecuritiesList(string code, string num);

        [OperationContract]
        [WebGet(UriTemplate = "securities/list/{*market}", RequestFormat = ServiceEnvironment.WebRequestFormat, ResponseFormat = ServiceEnvironment.WebResponseFormat, BodyStyle = ServiceEnvironment.WebBodyStyle)]
        List<Securities> GetSecuritiesList(string market);

        [OperationContract]
        [WebGet(UriTemplate = "marketstatistic/search/{code}/{day}", RequestFormat = ServiceEnvironment.WebRequestFormat, ResponseFormat = ServiceEnvironment.WebResponseFormat, BodyStyle = ServiceEnvironment.WebBodyStyle)]
        MarketStatistic GetSingle(string code, string day);

        [OperationContract]
        [WebGet(UriTemplate = "marketstatistic/list/{code}/{firstTime}/{lastTime}", RequestFormat = ServiceEnvironment.WebRequestFormat, ResponseFormat = ServiceEnvironment.WebResponseFormat, BodyStyle = ServiceEnvironment.WebBodyStyle)]
        IEnumerable<MarketStatistic> GetList(string code, string  firstTime, string lastTime);
    }
}
